﻿using System;

namespace _12306Bot.Common
{
    public class TrainInfo
    {
        #region 信息定义
        /// <summary>
        /// 车次
        /// </summary>
        private String _station_train_code;
        /// <summary>
        /// 车次
        /// </summary>
        public String Station_train_code
        {
            get { return _station_train_code; }
        }
        /// <summary>
        /// 历时
        /// </summary>
        private String _lishi;
        /// <summary>
        /// 历时
        /// </summary>
        public String Lishi
        {
            get { return _lishi; }
        }
        /// <summary>
        /// 发车时间
        /// </summary>
        private String _train_start_time;
        /// <summary>
        /// 发车时间
        /// </summary>
        public String Train_start_time
        {
            get { return _train_start_time; }
        }
        /// <summary>
        /// 系统车次编号
        /// </summary>
        private String _trainno4;
        /// <summary>
        /// 系统车次编号
        /// </summary>
        public String Trainno4
        {
            get { return _trainno4; }
        }
        /// <summary>
        /// 发站站代号
        /// </summary>
        private String _from_station_telecode;
        /// <summary>
        /// 发站站代号
        /// </summary>
        public String From_station_telecode
        {
            get { return _from_station_telecode; }
        }
        /// <summary>
        /// 到站站代号
        /// </summary>
        private String _to_station_telecode;
        /// <summary>
        /// 到站站代号
        /// </summary>
        public String To_station_telecode
        {
            get { return _to_station_telecode; }
        }
        /// <summary>
        /// 到站时间
        /// </summary>
        private String _arrive_time;
        /// <summary>
        /// 到站时间
        /// </summary>
        public String Arrive_time
        {
            get { return _arrive_time; }
        }
        /// <summary>
        /// 发站站名
        /// </summary>
        private String _from_station_name;
        /// <summary>
        /// 发站站名
        /// </summary>
        public String From_station_name
        {
            get { return _from_station_name; }
        }
        /// <summary>
        /// 到站站名
        /// </summary>
        private String _to_station_name;
        /// <summary>
        /// 到站站名
        /// </summary>
        public String To_station_name
        {
            get { return _to_station_name; }
        }
        /// <summary>
        /// 发站编号（具体意义不明）
        /// </summary>
        private String _from_station_no;
        /// <summary>
        /// 发站编号（具体意义不明）
        /// </summary>
        public String From_station_no
        {
            get { return _from_station_no; }
        }
        /// <summary>
        /// 到站编号（具体意义不明）
        /// </summary>
        private String _to_station_no;
        /// <summary>
        /// 到站编号（具体意义不明）
        /// </summary>
        public String To_station_no
        {
            get { return _to_station_no; }
        }
        /// <summary>
        /// 余票信息
        /// </summary>
        private String _ypInfoDetail;
        /// <summary>
        /// 余票信息
        /// </summary>
        public String YpInfoDetail
        {
            get { return _ypInfoDetail; }
        }
        /// <summary>
        /// 实在猜不出这个是干什么用的
        /// </summary>
        private String _mmStr;
        /// <summary>
        /// 实在猜不出这个是干什么用的
        /// </summary>
        public String MmStr
        {
            get { return _mmStr; }
        }
        /// <summary>
        /// 这个也猜不出干嘛的
        /// </summary>
        private String _locationCode;
        /// <summary>
        /// 这个也猜不出干嘛的
        /// </summary>
        public String LocationCode
        {
            get { return _locationCode; }
        }

        #endregion

        public TrainInfo(String TrainInfo)
        {
            String[] strsTrainInfo;
            //foreach (Match m in mcInfo)
            //{
            //    if (m.Groups[1].Value.Split('#')[0] == TrainCode.ToUpper())
            //    {
            //strsTrainInfo = m.Groups[1].Value.Split('#');
            strsTrainInfo = TrainInfo.Split('#');
            this._station_train_code = strsTrainInfo[0];
            this._lishi = strsTrainInfo[1];
            this._train_start_time = strsTrainInfo[2];
            this._trainno4 = strsTrainInfo[3];
            this._from_station_telecode = strsTrainInfo[4];
            this._to_station_telecode = strsTrainInfo[5];
            this._arrive_time = strsTrainInfo[6];
            this._from_station_name = strsTrainInfo[7];
            this._to_station_name = strsTrainInfo[8];
            this._from_station_no = strsTrainInfo[9];
            this._to_station_no = strsTrainInfo[10];
            this._ypInfoDetail = strsTrainInfo[11];
            this._mmStr = strsTrainInfo[12];
            this._locationCode = strsTrainInfo[13];
            //        break;
            //    }
            //}
        }
    }
}
